<?php

namespace app\common\model;

use app\admin\model\GroupUser;
use think\model\relation\HasMany;

class Group extends BaseModel
{
    /**
     * @return HasMany
     */
    public function company(): HasMany
    {
        return $this->hasMany(Company::class, 'group_id', 'id');
    }

    /**
     * @return HasMany
     */
    public function user(): HasMany
    {
        return $this->hasMany(GroupUser::class, 'group_id', 'id');
    }
}